From: Matthew Daley Date: Wed, 30 Oct 2013 07:52:03 +0000 (+1300) Subject: xenctx: correct error check when opening libxc X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6091 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https://%22%22/%22http:/www.example.com/cgi/%22https:/%22%22?a=commitdiff_plain;h=1924ed33aca6b162416a399902e7f687dec14038;p=xen.git xenctx: correct error check when opening libxc Coverity-ID: 1054979 Coverity-ID: 1055238 Signed-off-by: Matthew Daley Reviewed-by: George Dunlap Reviewed-by: Andrew Cooper Acked-by: Ian Campbell --- diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c index a86d5121e4..c4b7912f88 100644 --- a/tools/xentrace/xenctx.c +++ b/tools/xentrace/xenctx.c @@ -897,7 +897,7 @@ int main(int argc, char **argv) read_symbol_table(symbol_table); xenctx.xc_handle = xc_interface_open(0,0,0); /* for accessing control interface */ - if (xenctx.xc_handle < 0) { + if (xenctx.xc_handle == NULL) { perror("xc_interface_open"); exit(-1); }